package com.yale.user.service;

import com.yale.user.dao.UserDao;
import com.yale.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yale
 */
@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public User findByMailAndPassword(String mail, String password){
        return userDao.findByMailAndPassword(mail, password);
    }

    public User findByMail(String mail) {
        return userDao.findByMail(mail);
    }

    public void save(User user) {
        userDao.save(user);
    }
}
